import request from '@/request'

/**
 * 获取所有文章标签
 * @returns 所有文章标签
 */
export function getAllTags() {
  return request({
    url: '/article/forumArticleTag/allTags',
    method: 'get',
  })
}


export function getAllTagsDetail() {
  return request({
    url: '/tags/detail',
    method: 'get',
  })
}

/**
 * 获取当前6个最热标签
 * @returns 
 */
export function getHotTags() {
  return request({
    url: '/article/forumArticleTag/hot',
    method: 'get',
  })
}

/**
 * 根据id查询标签
 * @param {*} id 
 * @returns 
 */
export function getTag(id) {
  return request({
    url: `/article/forumArticleTag/detail/${id}`,
    method: 'get',
  })
}

export function getTagDetail(id) {
  return request({
    url: `/tags/detail/${id}`,
    method: 'get',
  })
}
